package work3_9;

import java.util.TreeMap;

public class Demo2 {
    public static void main(String[] args) {
        /**
         * TreeMap的使用方法
         */
        TreeMap map=new TreeMap();
        //多个value值选定k会覆盖，最后一个显示
        map.put(1,"a");
        map.put(1,"b");
        map.put(3,"c");
        map.put(4,"null");
        System.out.println(map);
        // System.out.println(map.remove(3));
        System.out.println(map);
        //多次覆盖后它删除时会删除
        System.out.println(map.remove(1,"b"));
        System.out.println(map);

    }
}

